package designpatterns.responsibility.chain.code.approve;

public class Client {
    public static void main(String[] args) {
        ApproveChain director = new Director("李");
        ApproveChain dean = new Dean("张");
        ApproveChain vicePrincipal = new VicePrincipal("陈");
        ApproveChain principal = new Principal("黄");

        // 形成责任链
        director.setNextApprover(dean);
        dean.setNextApprover(vicePrincipal);
        vicePrincipal.setNextApprover(principal);
        principal.setNextApprover(director);// 形成闭环

        // 开始审批
        Approve approve = new Approve("花花", 50001l);
        director.doApprove(approve);


    }
}
